﻿using Abp.EntityFrameworkCore.Configuration;
using Abp.Modules;
using Batman.IdentityServer.Extension.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;

namespace Batman.IdentityServer.Extension
{
    public class BatmanIdentityServerModule : AbpModule
    {
        private IConfiguration AspNetConfiguration;

        public BatmanIdentityServerModule(IConfiguration configuration)
        {
            AspNetConfiguration = configuration;
        }

        public override void PreInitialize()
        {
            //var connectionString = AspNetConfiguration.GetConnectionString("DefaultConnection");
            //Configuration.Modules.AbpEfCore().AddDbContext<RbacDbContext>(options =>
            //{
            //    options.DbContextOptions.UseMySql(connectionString);
            //});
        }

        public override void Initialize()
        {
            base.Initialize();
        }
    }
}
